import Vue from 'vue';
import App from './App';
import Vuex from 'vuex';
import {router} from './router';
import store from './store';
import 'normalize.css';
import './permission';

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

import Swiper from 'swiper';
import 'swiper/css/swiper.min.css';
Vue.prototype.$swiper = (...arg) => new Swiper(...arg);

import GL_Components from './components';

import './assets/style/variable.scss';
import './assets/style/base.scss';
import './assets/style/common.scss';
import './assets/style/iconfont.css';

import echarts from 'echarts';
Vue.prototype.$chart=echarts;

import moment from 'moment';
Vue.prototype.$moment = moment;

Vue.config.productionTip = false;
Vue.use(ElementUI, { size: 'small '});
Vue.use(Vuex);
Vue.use(GL_Components);
// 请求
import axios from 'axios';
// 请求方法js
import {fetch,post,httpGet,httpPost,getExport} from "./api/http";
Vue.prototype.$axios = axios;
Vue.prototype.$httpGet = httpGet;
Vue.prototype.$httpPost = httpPost;
Vue.prototype.$fetch = fetch;
Vue.prototype.$post = post;
Vue.prototype.$export = getExport;

Vue.filter('datefmt',function (input,fmtstring) {
    if(input){
        return moment(input).format(fmtstring);
    }else{
        return "";
    }
});



new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
